package com.sheng.controller;

import com.sheng.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Reference  //远程注入
    private UserService userService;

    @RequestMapping("/sayHello")
    public String sayHello() {
        System.out.println("我是你   ....");
        return userService.add();
    }
}
